package com.wlps.mapper;

import com.wlps.entity.CommodityWarehouse;
import com.wlps.entity.ReturnOutOfStock;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 退货出库单表(return_out_of_stock) Mapper 接口
 * </p>
 *
 * @author ZWYZY
 * @since 2020-07-31
 */
@Repository
public interface ReturnOutOfStockMapper extends BaseMapper<ReturnOutOfStock> {
    /**
     * 根据商品名称查询库房存放的商品
     *
     * @param name 商品名称
     * @param id   库房id
     * @return
     */
    CommodityWarehouse selectCommodityWareHouseByCommodityName(@Param(value = "name") String name, @Param(value = "id") long id);


    /**
     * 修改库房当前商品得当前储量
     *
     * @param name
     * @param id
     * @param currentNumber
     */
    void updateCommodityWarehouseCurrentNumber(@Param(value = "name") String name, @Param(value = "id") long id, @Param(value = "currentNumber") long currentNumber);
}
